<?php
/* ------------------------------------------------------------------------
 * AION-KOREA Admin Control Panel
 *
 * @version 1.0
 * @author Taro6222 (AION-KOREA Admin CP main Developer)
 * @link http://redmine.aionkorea.org/projects/ak-admin-cp
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/deed.ko
 * @APM http://www.apachefriends.org/en/xampp.html
 *
------------------------------------------------------------------------ */

//auth
common::admincpSession();

//페이징 처리
$perPage = ( isset( $_GET['perPage'] ) && $_GET['perPage'] != '' ) ? $_GET['perPage'] : '15';
$currentPage = ( isset( $_GET['page'] ) && $_GET['page'] != '' ) ? $_GET['page'] : 1;
$total = daoAccount::getAccountTotal();
$page = common::pageTranslation( $currentPage, $perPage, $total );
$pageLink = common::linkReplace( 'page', '{page}' );
$pageList = common::buildTranslation( $currentPage, $page, 0, $pageLink );

//db list
$list = daoAccount::getAccountList( $perPage, $page['no'] );

//--- template
$tpl = Template::getInstance();
$tpl->template_dir = __COMMON_TEMPLATE_ADMINCP;
$tpl->setDefine( 'body', Zend_Registry::get('templateName') . '.html' );

$tpl->setVariable( "page", $pageList );
$tpl->setVariable( "list", $list );

$tpl->display( "body" );

